package com.wxtl.action;

import com.wxtl.action.base.BaseAction;
import com.wxtl.entity.Customer;
import com.wxtl.service.CustomerService;
import com.wxtl.util.Page;

/**
 * 客户相关action
 * @author liulin
 * @version 2012-12-29
 */
public class CustomerAction extends BaseAction {
	/**
	 * 
	 */
	private static final long serialVersionUID = -7822557905151117196L;

	private Customer customer=new Customer();

	private CustomerService customerService;

	public Customer getCustomer() {
		return customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	public CustomerService getCustomerService() {
		return customerService;
	}

	public void setCustomerService(CustomerService customerService) {
		this.customerService = customerService;
	}

	public String query(){
		Page pageData=customerService.query(super.getDataGrid(),customer);
		setPageData(pageData);
		return SUCCESS;
	}
	
	public String update(){
		customerService.update(customer);
		return SUCCESS;
	}
}
